inline fun <R> fold(onSuccess: (value: T) -> R, onFailure: (exception: Throwable) -> R): R
Returns the result of onSuccess for the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated Throwable exception if it is failure.
Returns the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated Throwable exception if it is failure.
Returns the encapsulated result of the given block function applied to the encapsulated value if this instance represents success or the original encapsulated Throwable exception if it is failure.
Transforms this KmmResult into a KmmResult of different success type according to block and leaves the failure case untouched. Avoids nested KmmResults